var http = require('http');

var server = new http.Server();

server.on('request',function (request,response) {

    console.log(request.url);
    response.end("the message is  from " + request.url);

}).listen(3000)


server.on('connection',function () {
    console.log("connected");
})

server.on('close',function () {
    console.log("closing....")
})